package com.haoran.dwz.config.util;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Component
@ConfigurationProperties(prefix = "node")
public class NodeProperties {
	@Value("${node.service.name:dwz}")
	private String serviceName;
	
	@Value("${node.service.tag:dev}")
	private String serviceTag;
	
	@Value("${node.service.port:8080}")
	private int servicePort;
	
	@Value("${node.health.url:http://localhost:8080/health}")
	private String healthUrl;
	
	@Value("${node.health.interval:10}")
	private int healthInterval;

	public String getServiceName() {
		return serviceName;
	}

	public void setServiceName(String serviceName) {
		this.serviceName = serviceName;
	}

	public String getServiceTag() {
		return serviceTag;
	}

	public void setServiceTag(String serviceTag) {
		this.serviceTag = serviceTag;
	}

	public int getServicePort() {
		return servicePort;
	}

	public void setServicePort(int servicePort) {
		this.servicePort = servicePort;
	}

	public String getHealthUrl() {
		return healthUrl;
	}

	public void setHealthUrl(String healthUrl) {
		this.healthUrl = healthUrl;
	}

	public int getHealthInterval() {
		return healthInterval;
	}

	public void setHealthInterval(int healthInterval) {
		this.healthInterval = healthInterval;
	}
	
}
